package com.gxa.learning.pc.service;

import com.gxa.learning.core.exception.BusinessException;
import com.gxa.learning.core.pojo.ProjectSign;
import com.gxa.learning.core.service.BaseService;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface ProjectSignService extends BaseService<ProjectSign> {
    /**
     * 发起一个签到（目前还没有考虑在不同端发起签到与取消的情况）
     */
    void sendSignIn(Long pid, Long uid) throws BusinessException;

    /**
     * 停止签到
     */
    void stopSign(Long pid, Long uid) throws BusinessException;

    /**
     * 判断学生是否有签到
     */
    String haveCheckSign(Long pid, Long uid) throws BusinessException;

    /**
     * 签到
     */
    void signIn(Long pid, Long uid, String key) throws BusinessException;

    /**
     * 获取签到记录的列表
     */
    List<Map<String, Object>> getSignInList(String name, Integer page, Integer size, Long pid, Date start, Date end) throws BusinessException;

    /**
     * 获取所有签到记录的列表
     */
    List<Map<String, Object>> getAllSignInList(String name, Long pid) throws BusinessException;

    /**
     * 判断当前用户是否发起了签到
     */
    Boolean isSendSign(Long uid, Long pid) throws BusinessException;

    /**
     *获取一个用户自己的签到
     */
    List<Map<String,Object>> getMySignList(Long pid,Long uid) throws BusinessException;

}
